package com.example.leetcode.graph;

import com.example.leetcode.array.common.ArrayUtils;
import com.example.leetcode.graph.common.GraphUtils;

import java.util.List;

class Solution1557 {
    public List<Integer> findSmallestSetOfVertices(int n, List<List<Integer>> edges) {
        return GraphUtils.findSmallestSetOfVertices(n, edges);
    }
}

public class leetcode1557 {
    public static void main(String[] args) {
        Solution1557 solution1557 = new Solution1557();
        int n = 6;
        int[][] nums = {{0, 1}, {0, 2}, {2, 5}, {3, 4}, {4, 2}};
        List<List<Integer>> edges = ArrayUtils.convertArrayToList(nums);
        System.out.println(solution1557.findSmallestSetOfVertices(n, edges));
    }
}
